import request from '@/utils/request'
import defaultSettings from '@/settings'

// 头寸维护录入详情数据
export function detail(params) {
    return request({
        url: `${defaultSettings.ctx.cnapsApp}/transactionManage/balanceManage/BalanceManageEntry/detail`,
        method: 'get',
        params,
    })
}
// 头寸维护录入保存接口
export function save(data) {
    return request({
        url: `${defaultSettings.ctx.cnapsApp}/transactionManage/balanceManage/BalanceManageEntry/save`,
        method: 'post',
        data,
    })
}


// 头寸维护审核主页列表数据
export const approveApiUrlConfig = {
    queryUrl: `${defaultSettings.ctx.cnapsApp}/transactionManage/balanceManage/BalanceMangeApprove/search`,
}
export function approveDetail(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/transactionManage/balanceManage/BalanceMangeApprove/detail`,
    method: 'post',
    data,
  })
}

// 头寸维护审核接口
export function approve(data) {
    return request({
        url: `${defaultSettings.ctx.cnapsApp}/transactionManage/balanceManage/BalanceMangeApprove/approve`,
        method: 'post',
        data,
    })
}
// 头寸维护拒绝接口
export function reject(data) {
    return request({
        url: `${defaultSettings.ctx.cnapsApp}/transactionManage/balanceManage/BalanceMangeApprove/reject`,
        method: 'post',
        data,
    })
}

// 头寸维护历史记录查询主页列表数据
export const historyApiUrlConfig = {
    queryUrl: `${defaultSettings.ctx.cnapsApp}/transactionManage/balanceManage/BalanceManageHistoryQuery/search`,
}

// 头寸维护历史记录查询查看明细数据
export function historyDetail(params) {
    return request({
        url: `${defaultSettings.ctx.cnapsApp}/transactionManage/balanceManage/BalanceManageHistoryQuery/detail`,
        method: 'get',
        params,
    })
}

// 头寸查询页面数据接口
export function pageDetail(params) {
    return request({
        url: `${defaultSettings.ctx.cnapsApp}/transactionManage/balanceManage/BalanceManageQuery/page`,
        method: 'get',
        params,
    })
}
